home *** CD-ROM | disk | FTP | other *** search
-
-
-
- ssssyyyyssssccccttttllll ssssyyyyssssccccttttllll
-
-
-
- NNNNAAAAMMMMEEEE
- sysctl - get or set system information
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ssssyyyyssssccccttttllll....hhhh>>>>
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ssssoooocccckkkkeeeetttt....hhhh>>>>
-
- ssssyyyyssssccccttttllll((((iiiinnnntttt ****nnnnaaaammmmeeee,,,, uuuu____iiiinnnntttt nnnnaaaammmmeeeelllleeeennnn,,,, vvvvooooiiiidddd ****oooollllddddpppp,,,, ssssiiiizzzzeeee____tttt ****oooollllddddlllleeeennnnpppp,,,,
- vvvvooooiiiidddd ****nnnneeeewwwwpppp,,,, ssssiiiizzzzeeee____tttt nnnneeeewwwwlllleeeennnn))))
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The _s_y_s_c_t_l function retrieves system information. The information
- available from _s_y_s_c_t_l consists of integers, strings, and tables, and is a
- small subset of that available from the function of the same name in
- _4._4_B_S_D-_L_i_t_e.
-
- Unless explicitly noted below, _s_y_s_c_t_l returns a consistent snapshot of
- the data requested. Consistency is obtained by locking the destination
- buffer into memory so that the data may be copied out without blocking.
-
- The state is described using a ``Management Information Base'' (MIB)
- style name, listed in _n_a_m_e, which is a _n_a_m_e_l_e_n length array of integers.
-
- The information is copied into the buffer specified by _o_l_d_p. The size of
- the buffer is given by the location specified by _o_l_d_l_e_n_p before the call,
- and that location gives the amount of data copied after a successful
- call. If the amount of data available is greater than the size of the
- buffer supplied, the call supplies as much data as fits in the buffer
- provided and returns with the error code ENOMEM. If the old value is not
- desired, _o_l_d_p and _o_l_d_l_e_n_p should be set to NULL.
-
- The size of the available data can be determined by calling _s_y_s_c_t_l with a
- NULL parameter for _o_l_d_p. The size of the available data will be returned
- in the location pointed to by _o_l_d_l_e_n_p. For some operations, the amount
- of space may change often. For these operations, the system attempts to
- round up so that the returned size is large enough for a call to return
- the data shortly thereafter.
-
- To set a new value, _n_e_w_p is set to point to a buffer of length _n_e_w_l_e_n
- from which the requested value is to be taken. If a new value is not to
- be set, _n_e_w_p should be set to NULL and _n_e_w_l_e_n set to 0.
-
- The top level names are defined with a CTL_ prefix in <_s_y_s/_s_y_s_c_t_l._h>, and
- are as follows. The next and subsequent levels down are found in the
- include files listed here, and described in separate sections below.
-
-
- _N_a_m_e _N_e_x_t _l_e_v_e_l _n_a_m_e_s _D_e_s_c_r_i_p_t_i_o_n
- CTL_NET sys/socket.h Networking
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- ssssyyyyssssccccttttllll ssssyyyyssssccccttttllll
-
-
-
- CCCCTTTTLLLL____NNNNEEEETTTT
- The string and integer information available for the CTL_NET level is
- detailed below. The changeable column shows whether a process with
- appropriate privilege may change the value.
-
-
- _S_e_c_o_n_d _l_e_v_e_l _n_a_m_e _T_y_p_e
- PF_ROUTE routing messages
- PF_INET internet values
-
- _P_F__R_O_U_T_E
- Return the entire routing table or a subset of it. The data is
- returned as a sequence of routing messages. See _r_o_u_t_e(7p) for the
- header file, format and meaning). The length of each message is
- contained in the message header.
-
- The third level name is a protocol number, which is currently always
- 0. The fourth level name is an address family, which may be set to
- 0 to select all address families. The fifth and sixth level names
- are as follows:
-
-
- _F_i_f_t_h _l_e_v_e_l _n_a_m_e _S_i_x_t_h _l_e_v_e_l _i_s: _T_a_b_l_e
- NET_RT_FLAGS rtflags Routing
- NET_RT_DUMP None Routing (by flags)
- NET_RT_IFLIST None Interface list
-
- _P_F__I_N_E_T
- Get or set various global information about the internet protocols.
- The third level name is the protocol. The fourth level name is the
- variable name. The currently defined protocols and names are:
-
-
- _P_r_o_t_o_c_o_l _n_a_m_e _V_a_r_i_a_b_l_e _n_a_m_e _T_y_p_e
- ip forwarding integer
- ip redirect integer
- udp checksum integer
-
- The variables are as follows:
-
- ip.forwarding
- Returns 1 when IP forwarding is enabled for the host, meaning that
- the host is acting as a router.
-
- ip.redirect
- Returns 1 when ICMP redirects may be sent by the host. This option
- is ignored unless the host is routing IP packets, and should
- normally be enabled on all systems.
-
- udp.checksum
- Returns 1 when UDP checksums are being computed and checked.
- Disabling UDP checksums is strongly discouraged.
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-